package com.sun.stockexchangesimulate.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 股票交易记录表
 * @author sun
 * @TableName deal
 */
@TableName(value ="deal")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Deal implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 买家id
     */
    private Integer buyId;

    /**
     * 卖家id
     */
    private Integer sellId;

    /**
     * 股票代码
     */
    private String stockCode;

    /**
     * 交易价格,单价
     */
    private BigDecimal price;

    /**
     * 交易数量
     */
    private Integer quantity;

    /**
     * 交易时间
     */
    private LocalDateTime date;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}